import multiprocessing
import time



def calc_square(arg,result):

    for idx,n in enumerate(arg):
        time.sleep(1)
        result[idx]=(n*n)
    print ('inside result square is ' + str(result[:]))

if __name__ == "__main__":
    arg1=[2,3]
    result= multiprocessing.Array('i',2)
    p1 = multiprocessing.Process(target=calc_square,args=(arg1,result))
    p1.start()
    p1.join()

    print('outside result square is ' + str(result[:]))